package com.xbongbong.saas.feign;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.message.pojo.dto.ConsistencySyncRabbitMqDTO;
import com.xbongbong.pro.message.pojo.vo.ConsistencySyncRabbitMqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 吴峰
 * @date 2023/04/10 16:18
 */
@FeignClient(name = "xbb-work-order-web", contextId = "consistencySyncWorkOrderFeignClient")
public interface ConsistencySyncWorkOrderFeignClient {

    /**
     * 同步合同
     * @param consistencySyncRabbitMqDTO
     * @return
     * @throws XbbException
     */
    @RequestMapping(value = "/pro/v1/workOrderV2/dataConsistency/contract", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    ConsistencySyncRabbitMqVO syncContract(ConsistencySyncRabbitMqDTO consistencySyncRabbitMqDTO) throws XbbException;
}
